
#include "impl.h"

RuleEngineContext *
create_rule_engine( AllocContext * alloc_ctx )
{
    RuleEngineContext * r = ql_mallocz( alloc_ctx, sizeof(RuleEngineContext) );
    
    r->alloc_ctx = alloc_ctx;
    r->default_ns = alloc_id( alloc_ctx, "System", 0 );

    initialize_functions( r );

    return r;
}

void
free_rule_engine( RuleEngineContext * r )
{
    free_vars( r );

    free_functions( r );

    ql_free( r );
}

